import {http} from "@/interceptor/luch-request/index.js"


// 创建
export const saveFoods = (data) => {
    return http.post("api/admin/foods/v1/save", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}
// 编辑
export const updateFoods = (data) => {
    return http.put("api/admin/foods/v1/update", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 列表
export const pageFoods = (data) => {
	return http.get("api/admin/foods/v1/listTable", {
		data: data
	});
}
 
// 详情
 export const infoFoods = (id) => {
  	return http.get("api/admin/foods/v1/info/"+id, {
  		header:{
  			"content-type": "application/x-www-form-urlencoded"
  		}
  	});
 }
 // 删除
  export const deleteFoods = (id) => {
   	return http.delete("api/admin/foods/v1/delete/"+id, {
   		header:{
   			"content-type": "application/x-www-form-urlencoded"
   		}
   	});
  }